<?php
/**----------------------------------------------------------------------
 * Purpose： User Class
 * 
 * CreateDate : 2014/08/19
 * Description：
 * 		Process table user
 * 
 * @package		C-UNIT Class
 * @author	 	C-UNIT SQUARE Co.,Ltd. <info@c-unit.co.jp>
 * @copyright  	Copyright(c) 2014　C-UNIT SQUARE Co.,Ltd. All Rights Reserved.
 * @license		C-UNIT SQUARE Co.,Ltd.
 ------------------------------------------------------------------------*/

class Model_User extends Zend_Db_Table_Abstract
{
	/**
	 * Name of the table
	 */
	protected $_name = 'user';
	/**
	 * Primary key of table
	 */
	protected $_primary = 'id';

	/**-------------------------------------------------------------------
	 * Select all row from table user
	 * @return array of users
	 --------------------------------------------------------------------*/
	public function selectUser()
	{
		$arrData = array();
		$objDb = Zend_Registry::get('db');
		
		// select all users
		$objSelect = $objDb->select()
						   ->from($this->_name);

		// fetch users to array
		$arrData = $objDb->fetchAll($objSelect);

		return $arrData;
	}
}